var drop_menu = document.getElementById("drop_menu");
var delicacy = document.getElementById("delicacy");

// 下拉列表
delicacy.onmouseover = function() {
	drop_menu.style.display = "block";
}
drop_menu.onmouseover = function() {
	drop_menu.style.display = "block";
}
delicacy.onmouseout = function() {
	drop_menu.style.display = "none";
}
drop_menu.onmouseout = function() {
	drop_menu.style.display = "none";
}

// 上左轮廓图
var mySwiper = new Swiper('.swiper-container', {
	pagination: '.swiper-pagination',
	autoplay: 2000,
	prevButton: '.swiper-button-prev',
	nextButton: '.swiper-button-next',
	loop: true,
	effect: 'fade',
	fade: {
		crossFade: false,
	}
})
// 上右轮播图
var l = 1;
var j = 2;

setInterval(function() {
	$("#rightImg" + l).css("display", "none");
	$("#rightImg" + j).css("display", "block");
	l++;
	j++;

	if(l == 4) {
		l = 1;
	}
	if(j == 4) {
		j = 1;
	}
}, 6000);

var ani_content = document.getElementsByClassName("content")[0];
var content_after = document.getElementsByClassName("content_after")[0];
var timer = setTimeout(function() {
	ani_content.style.display = "none";
	content_after.style.display = "block";
	content_after.style.marginTop = "-50px";
}, 4000);

// 下边的hover属性

var bottomArr = document.querySelectorAll("#sw_foot>.little>a");
for(var i = 0; i < bottomArr.length; i++) {
	bottomArr[i].ind = i;
	bottomArr[i].onmouseover = function() {
		this.style.background = "url(../img/home-box-" + this.ind + "_CN_hover.jpg)";
	}
	bottomArr[i].onmouseout = function() {
		this.style.background = "url(../img/home-box-" + this.ind + "_CN.jpg)";
	}
}